package com.fxz.mapper;

import com.fxz.entity.SysUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author fxz
 * @since 2021-05-04
 */
@Repository
@Mapper
public interface SysUserMapper extends BaseMapper<SysUser> {

    /**
     * 根据用户id获取菜单id集合
     * @param userId 用户id
     * @return
     */
    List<Long> geNavMenuIds(@Param("userId") Long userId);

    /**
     * 根据菜单id 获取用户信息
     * @param menuId 菜单id
     * @return
     */
    List<SysUser> listByMenuId(@Param("menuId") Long menuId);
}
